PrinterInterface
Introduction打印机接口的基类 The base class of the printer interface MethodsClose-(void) Close; Discussion断开连接 Disconnect getShortAddress-(NSString *) getShortAddress; Discussion用于获取从蓝牙广播得到的地址,wifi得到的是ip地址 To get the address from the bluetooth broadcast, the wifi gets the IP address. Open-(void) Open; Discussion连接打印机 Connect the printer Read-(void) Read; Discussion从打印机读取数据(暂无用) Read data from the printer (useless) Write:-(void) Write:(NSData *)data; Discussion发送数据到打印机 Send data to the printer WriteAsync:-(void) WriteAsync:(NSData *)data; ParametersDiscussion发送数据到打印机,异步执行 Send data to printer, execute asynchronously PropertiesAddress@property (nonatomic, copy) NSString * Address; Discussion连接地址 Connection address blewritetype@property (nonatomic) BleWriteType blewritetype; Discussion蓝牙写入方式 Bluetooth write mode IsOpen@property (nonatomic, readonly) BOOL IsOpen; Discussion是否已经连接上打印机 Whether the printer has been connected to the printer Name@property (nonatomic, copy) NSString * Name; Discussion设备逻辑名称 用于蓝牙名称 The device logical name is used for Bluetooth name Port@property (nonatomic) NSInteger Port; Discussion连接端口(仅限wifiInterface使用) Connection port (only for wifiInterface use) printerCmdtype@property (nonatomic) PrinterCmdType printerCmdtype; Discussion指令类型, sdk内部没用到,为了给外部多连接时使用 Instruction type, sdk internal useless, in order to use the external multi-connection Timeout@property (nonatomic) NSTimeInterval Timeout; Discussion连接超时的时间,单位:秒(仅限wifiInterface使用) Connection timeout, unit: second (wifiInterface only) |